package org.android10.viewgroupperformance.activity;

import org.android10.gintonic.Cache.ICacheHolder;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by wangzhijie@wind-mobi.com on 2015/8/27.
 */
public enum DataHolder implements ICacheHolder {
    INSTANCE;
    public final Map<String, Object> map = new HashMap<String, Object>();

    @Override
    public void put(String key, Object value, long timeOutMs, long timeOutReturnInMs) {
        map.put(key, value);
    }

    public Object get(String key) {
        if (map.containsKey(key)) {
            return map.get(key);
        }
        return null;
    }

    @Override
    public Object getBackUp(String key) {
        return null;
    }
}
